<template>
  <m-page>
    <!-- 贷款发放账户选择切换页 -->
    <m-header title="选择账户"></m-header>


    <div class="select_account" v-for="item in data" :key="item.id">
      <div class="select-cell-item">
        <div class="select-cell-item-left">
          <span class="holder_card"></span>
          <div class="account_card">
            <p>{{item.name}}（尾号：{{item.cardNumber}}）</p>
            <span>余额：{{item.balance}}.00元</span>
          </div>
        </div>

        <div class="cell-item-right" v-if="item.id=='1'">默认账户</div>
      </div>
    </div>
    <div class="select_account_footer">
      <ynet-cell-item title="添加新的收账用户" arrow @click="addAccount()">
        <span class="holder" slot="left"></span>
      </ynet-cell-item>
    </div>
  </m-page>
</template>

<script>
import { CellItem } from "ynet-mobile";
export default {
  components: {
    [CellItem.name]:CellItem
  },
  data() {
    return {
      data: [
        {
          id: 1,
          name: "长沙银行储蓄卡",
          cardNumber: "2434",
          balance: "12334"
        },
        {
          id: 2,
          name: "交通银行储蓄卡",
          cardNumber: "5737",
          balance: "2141141"
        },
        {
          id: 3,
          name: "建设银行储蓄卡",
          cardNumber: "0033",
          balance: "2324"
        }
      ]
    };
  },
  created() {},
  mounted() {},
  methods:{
    //添加新的账户
    addAccount(){
      console.log("sususu")
    }
  },
  watch: {},
  computed: {}
};
</script>

<style lang="scss" scoped>
@import "./index.scss";
</style>

